[Ruby on Rails] Generate 404 error

Posted by siulamvictor on Stack Overflow See other posts from Stack Overflow or by siulamvictor
Published on 2010-04-26T10:13:39Z Indexed on 2010/04/26 10:43 UTC
Read the original article Hit count: 273

Filed under:
|

I create a action called "error404" in controller "pages", I would like to display this action if the following situation occurred:

  1. the controller in URL is not existed
  2. the action in URL is not existed

what should I do?

I tried to follow the instruction in this page, http://stackoverflow.com/questions/2553365/show-a-404-instead-of-500-in-rails , but seems only work with first situation.

Thanks for help. :)

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about 404